package com.tensquare.article.dao;

import com.tensquare.article.pojo.Article;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
 * @Author: Feng.Wang
 * @Company: Zelin.ShenZhen
 * @Description:
 * @Date: Create in 2019/3/23 17:48
 */
public interface ArticleDao extends JpaRepository<Article,String> {
    @Modifying
    @Query(nativeQuery = true,value = "update tb_article set state='1' where id=?1 ")
    public void examine(String id);
}
